<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    <title>WebPizza - Login</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    </head>
    <style type="text/css">
    	body {font-family: Verdana; font-size: 10pt;}
    </style>
    <f:view>
        <body> 
        <h:graphicImage value="/images/Pizza-75.png"/> 
        <h:graphicImage value="/images/webpizza.png"/> 
        <h:graphicImage value="/images/Pizza-75.png"/> 
        <h2>WebPizza - Login</h2>
        <h:form id="loginForm">
        	<h:panelGrid columns="3" width="50%">
        		<h:panelGroup><h:outputText value="Username:"/>	
        		</h:panelGroup>        			 
        		<h:panelGroup><h:inputText id="username" value="#{Login.username}" required="true">
		    		<f:validateLength minimum="4" maximum="10"/></h:inputText>
        		</h:panelGroup>
        		<h:panelGroup>
        		</h:panelGroup>
        		<h:panelGroup><h:outputText value="Password:"/>
        		</h:panelGroup>
        		<h:panelGroup><h:inputSecret id="password" value="#{Login.password}" required="true">
        			<f:validateLength minimum="4" maximum="10"/></h:inputSecret>        
        		</h:panelGroup>
        		<h:panelGroup>
        		</h:panelGroup>
        		<h:panelGroup><h:commandButton id="Entrar" value="Login" action="#{Login.login}"/>
        		</h:panelGroup>
        		<h:panelGroup>
        			<p><strong><h:outputText value="#{Login.errors}"/> </strong></p>
        			<p><strong><h:message for="username"/></strong></p> 
        			<p><strong><h:message for="password"/></strong></p>
        		</h:panelGroup>        	
        	</h:panelGrid> 			
	        <a href="register.jsf">Nuevo Usuario? - Registrarse ac&aacute;</a>
        </h:form>
        </body>        
    </f:view>
</html>